VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This code gets the hard-disk drive unit es. (c:\)

by Choosing Corporation (4 Submissions)
Category: Windows System Services
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Sat 16th December 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This code gets the hard-disk drive unit es. (c:\)

Rate This code gets the hard-disk drive unit es. (c:\)



Dim wRet As Long
Dim wWinDir As String * 128
wRet = GetWindowsDirectory(wWinDir, 128)
GetWindowsDir = Left(Trim(wWinDir), wRet) + IIf(Right(wWinDir, 1) <> "\", "\", "")
End Function
Public Function HardDisk() As String
HardDisk = Left(GetWindowsDir, 3) ' Gets the first three charapters (c:\)
End Function

Download this snippet    Add to My Saved Code

This code gets the hard-disk drive unit es. (c:\) Comments

No comments have been posted about This code gets the hard-disk drive unit es. (c:\). Why not be the first to post a comment about This code gets the hard-disk drive unit es. (c:\).

Post your comment

Subject:
Message:
0/1000 characters